import 'package:wanxiang_app/generated/json/base/json_field.dart';
import 'package:wanxiang_app/generated/json/im_entity.g.dart';
import 'dart:convert';

@JsonSerializable()
class ImEntity {
	late int code;
	late String msg;
	late List<ImData> data;

	ImEntity();

	factory ImEntity.fromJson(Map<String, dynamic> json) => $ImEntityFromJson(json);

	Map<String, dynamic> toJson() => $ImEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class ImData {
	late String account;
	late String nickname;
	late String photo;
	late String msg;


	@JSONField(name: "last_time")
	late String lastTime;
	late String unread;

	ImData();

	factory ImData.fromJson(Map<String, dynamic> json) => $ImDataFromJson(json);

	Map<String, dynamic> toJson() => $ImDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}